package com.wc.alorithm_blue_bridge._日期问题.Q1452;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/10/10 17:59
 * @description 时间显示
 * https://www.lanqiao.cn/problems/1452/learning/?page=2&first_category_id=1&sort=students_count&second_category_id=3
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        /**
         * 将所有的ms消除
         */
        long timeStamp = sc.nextLong() / 1000;

        /**
         * 将所有的天消除
         */
        long remainderTime = timeStamp % (60 * 60 * 24);

        /**
         * 计算时分秒
         */
        long hour = remainderTime / 3600;
        long min = (remainderTime - hour * 3600) / 60;
        long seconds = remainderTime % 60;

        /**
         * 显示
         */
        System.out.print((hour < 10 ? "0" : "") + hour + ":");
        System.out.print((min < 10 ? "0" : "") + min + ":");
        System.out.println((seconds < 10 ? "0" : "") + seconds);
    }
}
